<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>

<button onclick="sendApi()">点击发送</button>
<script>
    function sendApi(){
        console.log("发送请求中")
        $.ajax({
            url:'http://localhost:8001/',
            method:'get',
            data:{'name':'hello'},
            success:function (res) {
                console.log("返回数据",res)
            }
        })
    }
</script>
</body>
</html>